package io.wit.modules.wit.service.impl;

import io.wit.modules.wit.dao.FarmingDao;
import io.wit.modules.wit.entity.FarmingEntity;
import io.wit.modules.wit.service.FarmingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;



@Service("farmingService")
public class FarmingServiceImpl implements FarmingService {
	@Autowired
	private FarmingDao farmingDao;
	
	@Override
	public FarmingEntity queryObject(Long dataId){
		return farmingDao.queryObject(dataId);
	}
	
	@Override
	public List<FarmingEntity> queryList(Map<String, Object> map){
		return farmingDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return farmingDao.queryTotal(map);
	}
	
	@Override
	public void save(FarmingEntity farming){
		farming.setCreateTime(new Date());
		farmingDao.save(farming);
	}
	
	@Override
	public void update(FarmingEntity farming){
		farmingDao.update(farming);
	}
	
	@Override
	public void delete(Long dataId){
		farmingDao.delete(dataId);
	}
	
	@Override
	public void deleteBatch(Long[] dataIds){
		farmingDao.deleteBatch(dataIds);
	}
	
}
